#app {
  width: 100%;
  height: 100dvh;
  position: relative;
  background-color: #ccc;
}

#node-layer,
#connection-layer {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: transparent;
  z-index: 2;
}

#connection-layer {
  z-index: 1;
}

body {
  padding: 0;
  margin: 0;
}

.rect {
  position: absolute;
  border: 1px solid #000;
  min-width: 100px;
  min-height: 100px;
  transform: translate(-50%, -50%);
  background-color: transparent;
  text-align: center;
}

.rect i {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #fff;
  display: none;
}

.rect i:hover {
  border: 1px solid royalblue;
  filter: drop-shadow(0 0 8px rgba(125, 125, 125, 0.5));
}

.rect:hover i {
  display: block;
  z-index: 10;
}

i.top,
i.top-left,
i.top-right {
  top: 0;
}

i.bottom,
i.bottom-left,
i.bottom-right {
  bottom: 0;
}

i.right,
i.top-right,
i.bottom-right {
  right: 0;
}
i.right {
  top: 50%;
  transform: translate(50%, -50%);
}

i.center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

i.top {
  left: 50%;
  transform: translate(-50%, -50%);
}

i.top-right {
  transform: translate(50%, -50%);
}

i.top-left {
  transform: translate(-50%, -50%);
}

i.left {
  top: 50%;
  transform: translate(-50%, -50%);
}

i.bottom-left {
  transform: translate(-50%, 50%);
}

i.bottom {
  left: 50%;
  transform: translate(-50%, 50%);
}

i.bottom-right {
  transform: translate(50%, 50%);
}

.select-box {
  position: absolute;
  border: 1px solid royalblue;
  background-color: lightblue;
  opacity: 0.3;
  z-index: 100;
}

.active {
  outline: 2px solid blue;
}
